
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12">
            <div id="resposity" style="height: 800px;"></div>
        </div>
    </div>
<script src="/static/js/theme.js"></script>
<script type="application/javascript">
    $(function () {
        const echart = echarts.init(document.getElementById("resposity"),'theme');
        echart.showLoading();
        echart1();
        function echart1(){
            $.get('/resposity/findallresp', function (result) {
                var datax = [];
                var datay = [];
                console.log(result);
                for (const row in result.data) {
                    datax.push(result.data[row].respname);
                    datay.push(result.data[row].respnum)
                }
                console.log(datax);
                console.log(datay);
                var option = {


                    title: {
                        text: '库存统计图'

                    },
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                            type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                        }
                    },
                    legend: {
                        data: ['销量']

                    },
                    xAxis: {
                        data: datax,
                        axisTick: {
                            alignWithLabel: true
                        }
                    },
                    yAxis: {
                        type: 'value'
                    },
                    series: [{
                        name: '销量',
                        type: 'bar',
                        data: datay,
                        color: ['#f49f42'],

                    }
                    ]
                };
                echart.hideLoading();
                echart.setOption(option);

            });
        }
    })
</script>